package com.xxx.yuedong.campaign.service.impl;

import com.xxx.yuedong.campaign.db.dao.CollectDao;
import com.xxx.yuedong.campaign.pojo.Collect;
import com.xxx.yuedong.campaign.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;

/**
 * @author hc
 * @date 2023/08/28 22:47
 **/

@Service
public class CollectServiceImpl implements CollectService {

    @Resource(name = "collect")
    private CollectDao collectDao;

    @Override
    public int insert(Collect collect) {
        int rows = collectDao.insert(collect);
        return rows;
    }

    @Override
    public ArrayList<HashMap> searchCourseCollect(Long userId) {
        ArrayList<HashMap> list = collectDao.searchCourseCollect(userId);
        return list;
    }

    @Override
    public ArrayList<HashMap> searchPlanCollect(Long userId) {
        ArrayList<HashMap> list = collectDao.searchPlanCollect(userId);
        return list;
    }
}
